/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package EA_Model.IEC61970.Generation.GenerationDynamics.impl;

import EA_Model.IEC61970.Generation.GenerationDynamics.DrumBoiler;
import EA_Model.IEC61970.Generation.GenerationDynamics.GenerationDynamicsPackage;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;

import org.eclipse.emf.ecore.impl.ENotificationImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Drum Boiler</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link EA_Model.IEC61970.Generation.GenerationDynamics.impl.DrumBoilerImpl#getDrumBoilerRating <em>Drum Boiler Rating</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class DrumBoilerImpl extends FossilSteamSupplyImpl implements DrumBoiler {
	/**
	 * The cached value of the '{@link #getDrumBoilerRating() <em>Drum Boiler Rating</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getDrumBoilerRating()
	 * @generated
	 * @ordered
	 */
	protected EA_Model.IEC61970.Domain.Float drumBoilerRating;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected DrumBoilerImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return GenerationDynamicsPackage.Literals.DRUM_BOILER;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EA_Model.IEC61970.Domain.Float getDrumBoilerRating() {
		if (drumBoilerRating != null && drumBoilerRating.eIsProxy()) {
			InternalEObject oldDrumBoilerRating = (InternalEObject)drumBoilerRating;
			drumBoilerRating = (EA_Model.IEC61970.Domain.Float)eResolveProxy(oldDrumBoilerRating);
			if (drumBoilerRating != oldDrumBoilerRating) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, GenerationDynamicsPackage.DRUM_BOILER__DRUM_BOILER_RATING, oldDrumBoilerRating, drumBoilerRating));
			}
		}
		return drumBoilerRating;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EA_Model.IEC61970.Domain.Float basicGetDrumBoilerRating() {
		return drumBoilerRating;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setDrumBoilerRating(EA_Model.IEC61970.Domain.Float newDrumBoilerRating) {
		EA_Model.IEC61970.Domain.Float oldDrumBoilerRating = drumBoilerRating;
		drumBoilerRating = newDrumBoilerRating;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, GenerationDynamicsPackage.DRUM_BOILER__DRUM_BOILER_RATING, oldDrumBoilerRating, drumBoilerRating));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case GenerationDynamicsPackage.DRUM_BOILER__DRUM_BOILER_RATING:
				if (resolve) return getDrumBoilerRating();
				return basicGetDrumBoilerRating();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case GenerationDynamicsPackage.DRUM_BOILER__DRUM_BOILER_RATING:
				setDrumBoilerRating((EA_Model.IEC61970.Domain.Float)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case GenerationDynamicsPackage.DRUM_BOILER__DRUM_BOILER_RATING:
				setDrumBoilerRating((EA_Model.IEC61970.Domain.Float)null);
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case GenerationDynamicsPackage.DRUM_BOILER__DRUM_BOILER_RATING:
				return drumBoilerRating != null;
		}
		return super.eIsSet(featureID);
	}

} //DrumBoilerImpl
